package com.zxy.health.service;

import com.zxy.health.dao.ReportDao;
import com.zxy.health.mapper.ReportMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ReportService {
    @Autowired
    ReportMapper reportMapper;
    public boolean addReport(ReportDao reportDao){
        return reportMapper.addReport(reportDao);
    }

    public ReportDao getReport(){
        List<ReportDao> reportDaoList = new ArrayList<>();
        reportDaoList = reportMapper.getReport();

        return reportDaoList.get(reportDaoList.size()-1);
    }


}
